<template>
</template>

<script>
    import {AES} from '@common/utils/crypto';

	export default {
		name: 'Redirect',
        data() {
		    return {};
        },
        mounted () {
		    let data = this.$route.query.data;
		    if (this.$utils.isNotEmpty(data)) {
                let deData = JSON.parse(AES.de(decodeURIComponent(data)));
                let userInfo = deData.userInfo;
                this.$utils.setSessionStorage(this.$store.state.tokenName, userInfo.accessToken);
                this.$store.commit('setUserInfo', userInfo);
                this.$router.push(deData.url);
            }
        },
    }
</script>

<style scoped>

</style>
